using System;
#if IA || ASSERV
using Microsoft.SPOT;
using MLRobotic.IA;
#endif

namespace MLRobotic.IA.Tools
{
    class Math2
    {
        public static double Abs(double v)
        {
            if (v >= 0)
                return v;
            else
                return -v;
        }

        public static long Abs(long v)
        {
            if (v >= 0)
                return v;
            else
                return -v;
        }

        public static int Sign(double v)
        {
            return v >= 0 ? 1 : -1;
        }
    }
}
